
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mytools;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;

/**

 *

 * @author wl

 */
public class allselfexam extends ActionSupport {

    private int pagenumber;
    private int pagesize;
    private int totalpage;
    private List<exam> allselfexam;

    public allselfexam() {
    }

    public String execute() throws Exception {
        ActionContext actionContext = ActionContext.getContext();
        Map session = actionContext.getSession();
        String userid = session.get("userid").toString();
        examDAO ed = new examDAO();
        allselfexam = ed.getselfexamlist(getPagenumber(), getPagesize(),userid);
        return SUCCESS;

    }

    /**
     * @return the pagenumber
     */
    public int getPagenumber() {
        return pagenumber;
    }

    /**
     * @param pagenumber the pagenumber to set
     */
    public void setPagenumber(int pagenumber) {
        this.pagenumber = pagenumber;
    }

    /**
     * @return the pagesize
     */
    public int getPagesize() {
        return pagesize;
    }

    /**
     * @param pagesize the pagesize to set
     */
    public void setPagesize(int pagesize) {
        this.pagesize = pagesize;
    }

    /**
     * @return the totalpage
     */
    public int getTotalpage() {
        return totalpage;
    }

    /**
     * @param totalpage the totalpage to set
     */
    public void setTotalpage(int totalpage) {
        this.totalpage = totalpage;
    }

    /**
     * @return the allselfexam
     */
    public List<exam> getAllselfexam() {
        return allselfexam;
    }

    /**
     * @param allselfexam the allselfexam to set
     */
    public void setAllselfexam(List<exam> allselfexam) {
        this.allselfexam = allselfexam;
    }
}
